<template>
  <div>
    <el-tabs v-if="this.list" tab-position="left" style="height: 400px;">
      <el-tab-pane v-for="item in this.list" :key="item.phase_id" :label="item.phase_title">
        <el-tabs type="border-card" >
          <el-tab-pane v-for="e in item.sub_list" :key="item.phase_id + e.phase_user" :label="e.phase_user">
            <el-link v-for="n in e.json_url" :key="item.phase_id + e.phase_user + n.file_name" :href="n.url" target="_blank" type="primary">{{n.file_name}}</el-link>
            <div v-html="e.content"></div>
          </el-tab-pane>
        </el-tabs>
      </el-tab-pane>
    </el-tabs>
  </div>
</template>
<script>
import {APICRISISGETCRISISRECORDSOLUTIONS} from '@/common/api.js'
export default {
  data () {
    return {
      list: {}
    }
  },
  created () {
    this.listFn()
  },
  methods: {
    listFn () {
      APICRISISGETCRISISRECORDSOLUTIONS({
        crisis_id: this.$route.query.id
      }).then((res) => {
        this.list = res.data
      }).catch((err) => {
        this.$message.error(err.msg)
      })
    }
  }
}
</script>
